// 首页统计
import request from '@/utils/request'

// 完成任务统计，某年度每个部门完成的任务数量
export const getCompletedTasks = (year) => {
  return request({
    url: `/dashboard/${year}/completed-tasks`,
    method: "get",
  });
};

// 延期申请统计
export const getDelayTasks = (year) => {
  return request({
    url: `/dashboard/${year}/delay-requests`,
    method: "get",
  });
};

// 获取项目列表
export const getAllProjectsList = (year) => {
  return request({
    url: `/dashboard/${year}/projects`,
    method: "get",
  });
};

// 任务完成进度
export const getCompletedTasksRates = (year, projectId) => {
  return request({
    url: `/dashboard/${year}/task-complete-rates/${projectId}`,
    method: "get",
  });
};

// 未完成任务统计
export const getIncompleteTasks = () => {
  return request({
    url: `/dashboard/incomplete-tasks`,
    method: "get",
  });
};
